// 参数管理
import axios from "@/request/axios";

// 新增参数
export function parameterAdd(params: any) {
  return axios({
    url: "/system/parameter/add",
    method:"POST",
    data: params,
  });
}

// 删除参数
export function parameterDel(ids: any) {
  return axios({
    url: "/system/parameter/del",
    method:"POST",
    data: ids,
  });
}

// 修改参数
export function parameterEdit(params: any) {
  return axios({
    url: "/system/parameter/edit",
    method:"POST",
    data: params,
  });
}

// 获取参数详情
export function getParameterById(id: any) {
  return axios({
    url: "/system/parameter/detail",
    method:"POST",
    data: { id }
  });
}

// 查询参数（分页）
export function parameterQuery(params: any) {
  return axios({
    url: "/system/parameter/query",
    method:"POST",
    data: params,
  });
}

// 根据参数key获取参数信息
export function getParameterByKey(key: any) {
  return axios({
    url: "/system/parameter/getByKey",
    method:"POST",
    data: { key }
  });
}